var EventUtil = {
  addHandler: function (element, type, handler) {
      if (element.addEventListener) {
          element.addEventListener(type, handler, false);
      } else if (element.attachEvent) {
          element.attachEvent("on" + type, handler);
      } else {
          element["on" + type] = handler;
      }
  },
  getEvent: function (event) {
      return event ? event : window.event;
  },
  getClipboardText: function (event) {
      var clipboardData = (event.clipboardData || window.clipboardData);
      return clipboardData.getData("text");
  },
  setClipboardText: function (event, value) {
      if (event.clipboardData) {
          return event.clipboardData.setData("text/plain", value);
      } else if (window.clipboardData) {
          return window.clipboardData.setData("text", value);
      }
  },
  preventDefault: function (event) {
      if (event.preventDefault) {
          event.preventDefault();
      } else {
          event.returnValue = false;
      }
  }
};